package com.itasura.delegation;

import com.itasura.delegation.printers.CanonPrinter;
import com.itasura.delegation.printers.EpsonPrinter;
import com.itasura.delegation.printers.HpPrinter;

/**
 * @author sailor wang
 * @date 2018/11/22 11:42 AM
 * @description
 */
public class App {
    public static void main(String[] args) {
        DelegatePrinter canonDelegatePrinter = new DelegatePrinter(new CanonPrinter());
        DelegatePrinter epsonDelegatePrinter = new DelegatePrinter(new EpsonPrinter());
        DelegatePrinter hpDelegatePrinter = new DelegatePrinter(new HpPrinter());

        String message = "hello world";
        canonDelegatePrinter.print(message);
        epsonDelegatePrinter.print(message);
        hpDelegatePrinter.print(message);
    }
}